<?php
include('../Class/NhaSX_Class.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Thêm nhà sản xuất </title>
<head>
</head>

<body>
<form action="Add_NhaSX.php" method="post">
<div>Thêm Nhà Sản Xuất</div>

	<table style="width: 100%">
		<tr>
			<td style="width: 87px">Tên Nhà SX</td>
			<td><input name="tennsx" style="width: 196px" type="text" /></td>
		</tr>
		<tr>
			<td style="width: 87px" valign="top">Mô tả</td>
			<td><textarea name="mota" style="width: 286px; height: 69px"></textarea></td>
		</tr>
		<tr>
			<td style="width: 87px">&nbsp;</td>
			<td><input name="Submit" type="submit" value="Submit" />
			<input name="Reset1" type="reset" value="Reset" />
</td>
		</tr>
	</table>

</form>
<?php
if(isset($_POST['tennsx'])&&isset($_POST['mota']))
{
$TenNSX=$_POST['tennsx'];
$Mota= $_POST['mota'];
$nhasx=new NhaSX();
if($nhasx->Add_NhaSX($TenNSX,$Mota)<0)
{
	
	echo "Thêm thất bại!!".@mysql_errno();

}
else
{
	echo "Thêm thành công!!";
	header('location: Delete_NhaSX.php');
}
}
?>
</body>

</html>
